home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / rexx / status.strx < prev    next >
Text File  |  1993-10-14  |  2KB  |  68 lines

  1. /***************************************************************************
  2. *                                                                          *
  3. *  $VER: Status.strx 3.0 (14.Oct.93)                                       *
  4. *   Copyright © 1993 by Stylus, Inc.                                       *
  5. *   Author:  Jeff Blume                                                    *
  6. *                                                                          *
  7. *   This macro reports the Width, Height, Depth and Type (ie. B&W, etc.)   *
  8. *                                                                          *
  9. *                                                                          *
  10. ***************************************************************************/
  11.  
  12. options results
  13.  
  14. /* Get the image size (if Result=RESULT - no image loaded) */
  15. 'ImageWidth'; if Result = "RESULT" then exit; ImgWidth = Result
  16. 'ImageHeight'; ImgHeight = Result
  17. 'ImageType'; ImgType = Result
  18. 'ImageCMAPSize'; ImgCMAP = Result
  19.  
  20. select
  21.     when ImgType = 0 then ImgType = "Black & White"
  22.     when ImgType = 1 then ImgType = "Indexed "||"("||ImgCMAP||" Color)"
  23.     when ImgType = 2 then ImgType = "Greyscale (8 bit)"
  24.     otherwise ImgType = "True Color (24 bit)"
  25. end
  26.  
  27. call DefGads
  28. address REXXREQUEST
  29. 'GetRequest Gads'
  30.  
  31.  
  32. EXIT
  33.  
  34.  
  35. DEFGADS:
  36. /* Define Public Screen */
  37. Gads.PubScreen = "STYLUSTRACER"
  38.  
  39. /* Define Window */ 
  40. Gads.0.LeftEdge = 60; Gads.0.TopEdge = 12
  41. Gads.0.Width = 272; Gads.0.Height = 58
  42. Gads.0.Label = "Bitmap Status"
  43.  
  44. /* Define Label Gadgets */
  45. Gads.1.LeftEdge = 8; Gads.1.TopEdge = 8
  46. Gads.1.Width = 112; Gads.1.Height = 12
  47. Gads.1.Type = Label
  48. Gads.1.Label = "Image Width = "||ImgWidth
  49.  
  50. Gads.2.LeftEdge = 8; Gads.2.TopEdge = 16
  51. Gads.2.Width = 112; Gads.2.Height = 12
  52. Gads.2.Type = Label
  53. Gads.2.Label = "Image Height = "||ImgHeight
  54.  
  55. Gads.3.LeftEdge = 8; Gads.3.TopEdge = 24
  56. Gads.3.Width = 112; Gads.3.Height = 12
  57. Gads.3.Type = Label
  58. Gads.3.Label = "Image Type = "||ImgType
  59.  
  60. Gads.4.LeftEdge = 8; Gads.4.TopEdge = 32
  61. Gads.4.Width = 112; Gads.4.Height = 12
  62. Gads.4.Type = Label
  63. Gads.4.Label = "CMAP Size = "||ImgCMAP
  64.  
  65. /* Total Gadgets + Window */
  66. Gads.NumGads = 5
  67. return    /* return DefGads */
  68.